home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Meeting Pearls 4
/
Meeting Pearls Vol. IV (1996)(GTI - Schatztruhe)[!].iso
/
Pearls
/
dtype
/
Others
/
htds
/
Install
< prev
next >
Wrap
Text File
|
1996-09-08
|
20KB
|
719 lines
;
; $PROJECT: HyperText-Datatype-System
;
; $VER: Install 40.4 (15.08.96)
;
; by
;
; Stefan Ruppert , Windthorststrasse 5 , 65439 Floersheim , GERMANY
;
; (C) Copyright 1996
; All Rights Reserved !
;
; $HISTORY:
;
; 15.08.96 : 040.004 : added helpfile
; 08.06.96 : 040.003 : works now with pre V43 installer
; 25.02.96 : 040.002 : added catalog support
; 07.02.96 : 040.001 : initial
;
(set #project "HyperText-Datatype-System")
(set #loc-english (cat "english"))
(set #loc-german (cat "deutsch"))
(set #datatypes-list (cat
"hypertext.datatype\n"
"hyperguide.datatype\n"
"directory.datatype\n"
"man.datatype\n"
))
;
; V43 installer only
;
(procedure p_version name
(/ (getversion name) 65536)
)
(procedure p_revision name
(set #p_ver (getversion name))
(- #p_ver (* (/ #p_ver 65536) 65536))
)
;
; german texts
;
(set #lang-default 0)
(if (= @language "deutsch")
(
(set #lang-default 2)
(set #chs-txt-install "Installieren")
(set #chs-txt-remove "Entfernen")
(set #txt-english "Englisch")
(set #txt-german "Deutsch")
(set #txt-classdir-prompt "Wo liegen die System Klassen ?")
(set #txt-installing "Installiere")
(set #txt-cpu-versions (cat
"Das " @app-name " umfaßt, zur Zeit folgende Datatypes :\n"
#datatypes-list
"\nBemerkung:\n"
"Diese Datatypes sind für den Prozessor MC68000 kompiliert. "
"Falls Sie einen höheren Prozessor besitzen, müssen Sie das "
"Archive HTDS_xxx.lha besorgen. Wobei xxx für die Abkürzung "
"des Prozessors steht (030 für MC68030)."
))
(set #txt-dest-dir-prompt (cat
"Wohin soll " @app-name " installiert werden ?\n"
"(Es wird ein Verzeichnis HTDS angelegt)"
)
)
(set #txt-dest-dir-help (cat
"Wählen Sie hier ein Verzeichnis, indem alle Dateien abgelegt "
"werden, die nicht an ein entsprechenden Platz im System "
"gehören. Also hier werden keine #?.datatype oder #?.catalog "
"Dateien abgelegt, sondern nur Dokumentationsdateien und/oder "
"Includes&AutoDocs\n"
)
)
(set #txt-copy-descriptors-prompt "Kopiere Datatype Descriptoren")
(set #txt-procedure-prompt
(cat
"Bitte wählen Sie die entsprechende Aktion:"
)
)
(set #txt-procedure-help
(cat
"Hier können Sie wählen, ob Sie " @app-name " installieren "
"oder eine alte Version entfernen möchten.\n\n"
)
)
(set #txt-install "Welche Dateien sollen zusätzlich installiert werden ?")
(set #txt-copy-picdtpatch-prompt "Kopiere picdtpatch nach C: ?")
(set #txt-picdtpatch-prompt "Installieren von PicDTPatch ?\nFür nähere Information siehe Hilfe !")
(set #txt-picdtpatch-help
(cat "PicDTPatch wird benötigt, wenn Sie das HyperText-DataType-System "
"mit Bilder verwenden wollen und nicht den V43 picture.datatype "
"installiert haben (V43 arbeitet mit dem hypertext.datatype zusammen, "
"Danke Ralph). Dieses Programm fügt dem alten picture.datatype die "
"Methode DTM_DRAW hinzu, die benutzt wird, um ein Objekt aus dem "
"hypertext.datatype zu zeichnen.\n"
"ACHTUNG:\nWenn Sie Bilder als Hintergrund für die Workbench benutzen, "
"dann sollte PicDTPatch for IPrefs gestartet werden !\n\n"
)
)
(set #chs-txt-docs "Dokumentation (HyperGuide)")
(set #chs-txt-locale-sources "Lokalisations Dateien (#?.ct,#?.cd)")
(set #chs-txt-examples "Beispiel Doks")
(set #chs-txt-arexx "ARexx Skripts")
(set #chs-txt-programmer-stuff "Programmierer Dateien (includes,AutoDocs)")
(set #txt-copy-descriptors-prompt "Kopiere Datentyp Deskripitoren")
(set #txt-copy-catalog-prompt "Kopiere Katalog")
(set #txt-copy-helpfile-prompt "Kopiere HyperGuide Hilfe Datei")
(set #txt-copy-docs-prompt "Kopiere Dokumentation")
(set #txt-copy-examples-prompt "Kopiere Beispiel Dateien")
(set #txt-copy-pics-prompt "Kopiere Bilder")
(set #txt-copy-loc-sources-prompt "Kopiere Lokalisations Quelldateien")
(set #txt-copy-prog-files-prompt "Kopiere Programmier Dateien")
(set #txt-copy-arexx-prompt "Kopiere ARexx Skripts")
(set #txt-copy-shell-man-prompt "Kopiere man Skript")
(set #txt-install-ag-desc-prompt (cat
"Soll das HTDS auch für bestehende AmigaGuide Dateien verwendet werden ?\n\n"
"Dabei muß beachtet werden, das Programme, die die amigaguide.library benutzen, "
"nicht mehr korrekt die Dokumente/Hilfe anzeigen können. Das bedeutet auch, "
"das alle Programme die Menu oder Gadget Hilfe unterstützen, dann nicht mehr "
"richtig die Hilfe anzeigen können.\n\n"
"Daher empfiehlt sich diesen Teil nur dann zu installieren, wenn die oben "
"genannten Probleme bei ihnen nicht zutreffen.\n\n"
"Es wird später eine amigaguide.library geben, die diese Mängel beseitigt.\n"
))
(set #txt-install-ag-desc-help (cat
"Wenn sie für alle bestehenden AmigaGuide Dateien auch das HTDS verwenden wollen, "
"muß der entsprechende Datentyp Deskriptor verändert werden (Devs:DataTypes/AmigaGuide). "
"Dieser wird dann nach Sys:Storage/DataTypes kopiert."))
(set #txt-install-ag-link-prompt (cat
"Sie haben ausgewählt, den neuen hyperguide.datatype für alle ihre vorhandenen "
"AmigaGuide Dateien zu benutzen. In dieser Konfiguration arbeiten einige Programme "
"nicht korrekt. Unter anderem auch das AmigaGuide Programm in Sys:Utilities."
"Soll nun das AmigaGuide Programm durch ein Hard Link auf MultiView ersetzt werden ?"
))
(set #txt-install-ag-link-help "")
(set #txt-install-shell-man-prompt "Soll ein shell man Front-End in S: installiert werden ?")
(set #txt-language-prompt "Welche Sprachkataloge sollen installiert werden ?")
(set #txt-language-help (cat ""))
(set #txt-copy-include-files-prompt "Kopiere include Dateien")
(set #txt-end (cat
"Nun sollten sie ihr System neu starten. Sie können das HTDS auch ohne Neustart "
"benutzen. Aber es könnte nicht ganz korrekt arbeiten, da AddDataTypes teilweise "
"fehlerhaft ist."))
)
)
;
; english texts (default)
;
(if (OR (= @language "english") (= #lang-default 0))
(
(set #lang-default 1)
(set #chs-txt-install "Install")
(set #chs-txt-remove "Remove")
(set #txt-english "English")
(set #txt-german "German")
(set #txt-installing "Installing")
(set #txt-cpu-versions (cat
"Currently the " @app-name " consists out of the following "
"datatypes:\n\n"
#datatypes-list
"\nNote:\n"
"These datatypes libraries are compiled for "
"MC68000 processor. If you have a higher MC68xxx, look out "
"for archive called HTDS_xxx.lha, where xxx stands for the "
"processor abbrevation."
))
(set #txt-dest-dir-prompt (cat
"Where do you want to install the " @app-name " ?\n"
"(A drawer called HTDS will be created there)"
)
)
(set #txt-dest-dir-help (cat
"Please select here a drawer, in which all files are copied, "
"which have no appropriate place in the system. This are "
"documentations, examples and macro files and not #?.datatype "
"or #?.catalog files."
)
)
(set #txt-copy-descriptors-prompt "Copying the Descriptors")
(set #txt-procedure-prompt
(cat
"Please select the appropriate procedure:"
)
)
(set #txt-procedure-help
(cat
"You can here select the Install procedure to install "
"all nessecary files for the " @app-name ".\n"
"Or select Remove to remove all previously installed "
"files of the " @app-name " from your system.\n\n"
)
)
(set #txt-install "Select the files to install :")
(set #txt-copy-picdtpatch-prompt "copy picdtpatch to C: ?")
(set #txt-picdtpatch-prompt "Installation of PicDTPatch ?\nFor detailed information see help !")
(set #txt-picdtpatch-help (cat
"PicDTPatch is needed, if you want to use pictures within HyperText "
"objects and if you don't use V43 of the picture.datatype (Thanks Ralph)."
"This program adds a method to the picture.datatype to render a picture "
"at a specified position (DTM_DRAW).\n"
"Attention: If you use some pictures as WB backgounds, it should be "
"nesseccary to run PicDTPatch before IPrefs !!\n\n"
)
)
(set #chs-txt-docs "Documentation (HyperGuide)")
(set #chs-txt-locale-sources "Locale files (#?.ct,#?.cd)")
(set #chs-txt-examples "Example Docs")
(set #chs-txt-arexx "ARexx scripts")
(set #chs-txt-programmer-stuff "Programmer Files (includes,AutoDocs)")
(set #txt-copy-descriptors-prompt "Copy DataType descripitors")
(set #txt-copy-catalog-prompt "Copy catalog")
(set #txt-copy-helpfile-prompt "Copy HyperGuide help file")
(set #txt-copy-docs-prompt "Copy documentation files")
(set #txt-copy-examples-prompt "Copy example files")
(set #txt-copy-pics-prompt "Copy pictures")
(set #txt-copy-prog-files-prompt "Copy programmer files")
(set #txt-copy-loc-sources-prompt "Copy locale sourcefiles")
(set #txt-copy-arexx-prompt "Copy ARexx scripts")
(set #txt-copy-shell-man-prompt "Copy man script")
(set #txt-install-ag-desc-prompt (
"Should the HTDS be used for existing AmigaGuide files ?\n\n"
"Note: This may cause problems with programs, which uses the amigaguide.library. "
"Because the library can't display the documents/helptexts correctly. This also "
"includes programs, which supports menu and gadget help.\n\n"
"Therefore it is only recommended to install this part, if the above mentioned "
"problems do not fit in your system.\n\n"
"Later there will be a amigaguide.library replacement, which avoid these problems.\n"
))
(set #txt-install-ag-desc-help (cat
"If you want to use the HTDS for your existing AmigaGuide files, "
"it is necessary to change the datatype descriptor (Devs:DataTypes/AmigaGuide). "
"The old one will be copied to Sys:Storage/DataTypes."))
(set #txt-install-ag-link-prompt (cat
"You have choosen to use the new hyperguide.datatype for all of your "
"AmigaGuide files. So some programs don't work with this configuration. "
"Also AmigaGuide program doesn't work correctly.\n"
"Should I replace the AmigaGuide program in Sys:Utilities "
"to a hard link to MultiView ?"
))
(set #txt-install-ag-link-help "")
(set #txt-language-prompt "Which locale catalog should be installed ?")
(set #txt-language-help (cat ""))
(set #txt-install-shell-man-prompt "Install a shell man front-end to S: ?")
(set #txt-copy-include-files-prompt "Copy include files")
(set #txt-end (cat
"Now you should reboot your system. You can also try the HTDS without a boot, "
"but due to a bug in AddDataTypes it may not work correctly until you have "
"rebooted."))
)
)
(set #mode 0)
; Currently no UnInstall
;(set #mode
; (askchoice
; (prompt #txt-procedure-prompt)
; (help (cat #txt-procedure-help @askchoice-help))
; (choices #chs-txt-install #chs-txt-remove)
; )
;)
(if #mode
(set #pmode #txt-remove)
(set #pmode #txt-install)
)
; get classes dir
(set #classdir
(askdir
(prompt #txt-classdir-prompt)
(help @askdir-help)
(default "SYS:Classes")
)
)
; now do install or remove
(if #mode
; Remove
(
; Show what we are doing
(working "Removing " @app-name)
; Remove the non-standard pieces
; Don't want to use the confusing "Installation Complete" message
; when what we really did was remove things...
(message "The \"" @app-name "\" components "
"that you specified have been successfully removed")
(exit (quiet))
)
; Install
(
(message #txt-cpu-versions)
(complete 0)
(set #dest-dir
(askdir
(prompt #txt-dest-dir-prompt)
(help #txt-dest-dir-help @askdir-help)
(default "Work:")
)
)
(set #languages
(askoptions
(prompt #txt-language-prompt)
(choices #txt-english #txt-german)
(help #txt-language-help @askoptions-help)
(default #lang-default)
)
)
(if (= @user-level 0)
(set #instflags 3)
(set #instflags 15)
)
(set #instflags
(askoptions
(prompt #txt-install)
(choices #chs-txt-docs #chs-txt-examples #chs-txt-locale-sources #chs-txt-arexx) ; #chs-txt-programmer-stuff
(default #instflags)
(help #txt-install-help @askoptions-help)
)
)
(set #inst-docs (in #instflags 0))
(set #inst-examples (in #instflags 1))
(set #inst-locale-sources (in #instflags 2))
(set #inst-arexx (in #instflags 3))
(set #inst-programmer (in #instflags 4))
(set #install-ag-desc
(askbool
(prompt #txt-install-ag-desc-prompt)
(help (cat #txt-install-ag-desc-help @askbool-help))
)
)
(if #install-ag-desc
(set #install-ag-link
(askbool
(prompt #txt-install-ag-link-prompt)
(help (cat #txt-install-ag-link-help @askbool-help))
)
)
)
(set #install-man
(askbool
(prompt #txt-install-shell-man-prompt)
(help (cat #txt-install-shell-man-help @askbool-help))
)
)
(working #installing @app-name)
(complete 20)
(set #dest-dir (tackon #dest-dir "HTDS"))
(if (= (exists #dest-dir) 0)
(makedir #dest-dir (infos))
)
(set @default-dest #dest-dir)
(set #macro-dir (tackon #dest-dir "macros"))
(set #arexx-dir (tackon #dest-dir "ARexx"))
;
; only need to install the picdtpatch if orig. picture.datatype is found
;
(if (< @installer-version 43)
(set #inst-picdtpatch 1)
(set #inst-picdtpatch (< (p_version (tackon #classdir "DataTypes/picture.datatype")) 43))
)
(if #inst-picdtpatch
(
(startup @app-name
(command "run <>NIL: c:picdtpatch")
(prompt #txt-picdtpatch-prompt)
(help #txt-picdtpatch-help @startup-help)
)
(copyfiles
(prompt #txt-copy-picdtpatch-prompt)
(help @copyfiles-help)
(source "c/picdtpatch")
(dest "C:")
(confirm)
)
)
)
; Install the descriptors
(if (= (exists "devs/datatypes" (noreq)) 2)
(copyfiles
(prompt #txt-copy-descriptors-prompt)
(help @copyfiles-help)
(source "devs/datatypes")
(dest "DEVS:DataTypes")
(pattern "#?")
(infos)
)
)
(if #install-ag-desc
(
(if (= (exists "Devs:DataTypes/AmigaGuide" (noreq)) 1)
(if (= (exists "Sys:Storage/DataTypes/AmigaGuide" (noreq)) 0)
(copyfiles
(prompt #txt-copy-descriptors-prompt)
(help (cat #txt-copy-descriptors-help @copyfiles-help))
(source "Devs:DataTypes")
(dest "Sys:Storage/DataTypes")
(pattern "AmigaGuide#?")
(infos)
)
)
)
(if #install-ag-link
(if (= (exists "Sys:Utilities/AmigaGuide.Old" (noreq)) 0)
(if (= (exists "Sys:Utilities/AmigaGuide") 1)
(
(rename "Sys:Utilities/AmigaGuide" "Sys:Utilities/AmigaGuide.Old")
(run "C:MakeLink From Sys:Utilities/AmigaGuide To Sys:Utilities/MultiView Hard Force")
)
)
)
)
(copyfiles
(prompt #txt-copy-descriptors-prompt)
(help (cat #txt-copy-descriptors-help @copyfiles-help))
(source "devs")
(dest "DEVS:DataTypes")
(pattern "AmigaGuide#?")
(infos)
)
)
)
(complete 30)
; Install the datatypes
(set i 0)
(while (set #datatype (select i "hypertext" "hyperguide" "directory" "man" ""))
(copylib
(prompt (cat "Copying " #datatype ".datatype"))
(help @copylib-help)
(source (tackon "classes/datatypes" (cat #datatype ".datatype")))
(dest (tackon #classdir "DataTypes"))
(confirm)
)
(set i (+ i 1))
)
(complete 40)
(if (= (exists "macros" (noreq)) 2)
(
(copyfiles
(prompt #txt-copy-macros-prompt)
(source "")
(dest #dest-dir)
(pattern "macros#?")
(infos)
)
(if (= (exists "ENVARC:DataTypes/hyperguide.prefs" (noreq)) 0)
(
(textfile
(dest "ENVARC:DataTypes/hyperguide.prefs")
(append (cat "MACRODIR " #macro-dir "\n"))
)
(textfile
(dest "ENV:DataTypes/hyperguide.prefs")
(append (cat "MACRODIR " #macro-dir "\n"))
)
)
)
)
)
(complete 50)
(if (= (exists "locale" (noreq)) 2)
(
(set l 0)
(while (set #lang (select l #loc-english #loc-german ""))
(if (in #languages l)
(
(set c 0)
(while (set #catalog (select c "hypertextdt" "directorydt" ""))
(if (= (exists (cat "locale/catalogs/" #lang "/" #catalog ".catalog")) 1)
(copyfiles
(prompt (cat #txt-copy-catalog-prompt ": " #lang))
(source (cat "locale/catalogs/" #lang "/" #catalog ".catalog"))
(dest (cat "Locale:catalogs/" #lang))
)
)
(set c (+ c 1))
)
(if (= (exists (cat "locale/help/" #lang "/HTDS_Help.hguide")) 1)
(copyfiles
(prompt (cat #txt-copy-helpfile-prompt ": " #lang))
(source (cat "locale/help/" #lang "/HTDS_Help.hguide"))
(dest (cat "Help:" #lang))
)
)
; only install global TOC, if it doesn't exists
(if (= (exists (cat "Help:" #lang "/HTDS_TOC.hguide") (noreq)) 0)
(if (= (exists (cat "locale/help/" #lang "/HTDS_TOC.hguide")) 1)
(
(copyfiles
(prompt (cat #txt-copy-tocfile-prompt ": " #lang))
(source (cat "locale/help/" #lang "/HTDS_TOC.hguide"))
(dest (cat "Help:" #lang))
)
(rexx (cat "ARexx/AddTOCEntry.rexx HyperText-DataType-System " (tackon (tackon #dest-dir "docs") "HTDS.hguide")))
)
)
)
)
)
(set l (+ l 1))
)
)
)
(complete 60)
(if #inst-docs
(
(copyfiles
(prompt #txt-copy-docs-prompt)
(help @copyfiles-help)
(source "")
(dest #dest-dir)
(pattern "docs#?")
(infos)
)
)
)
(if #inst-examples
(
(copyfiles
(prompt #txt-copy-examples-prompt)
(help @copyfiles-help)
(source "")
(dest #dest-dir)
(pattern "examples#?")
(infos)
)
)
)
(if (or #inst-docs #inst-examples)
(
(copyfiles
(prompt #txt-copy-pics-prompt)
(help @copyfiles-help)
(source "")
(dest #dest-dir)
(pattern "pics#?")
(infos)
)
)
)
(complete 70)
(if #inst-arexx
(
(copyfiles
(prompt #txt-copy-arexx-prompt)
(help @copyfiles-help)
(source "")
(dest #dest-dir)
(pattern "ARexx#?")
(infos)
)
)
)
; install programmer files
(if #inst-programmer
(
(copyfiles
(prompt #txt-copy-prog-files-prompt)
(help @copyfiles-help)
(source "programmer")
(dest (tackon #dest-dir "programmer"))
(pattern "#?")
(infos)
)
(copyfiles
(source "programmer.info")
(dest #dest-dir)
)
(tooltype (dest (tackon #dest-dir "programmer.info")) (noposition))
)
)
(complete 80)
(if #inst-locale-sources
(
(copyfiles
(prompt #txt-copy-loc-sources-prompt)
(help @copyfiles-help)
(source "locale")
(dest (tackon #dest-dir "locale"))
(pattern "(#?.c?|translations)")
(infos)
)
(copyfiles
(source "locale.info")
(dest #dest-dir)
)
)
)
(if #install-man
(
(copyfiles
(prompt #txt-copy-man-shell-prompt)
(help @copyfiles-help)
(source "s")
(dest "s:")
(pattern "man#?")
(infos)
)
)
)
(complete 90)
(if (exists (cat "locale/ReadMe/" @language))
(copyfiles
(source (cat "locale/ReadMe/" @language))
(newname "ReadMe")
(dest #dest-dir)
)
(copyfiles
(source "ReadMe.txt")
(newname "ReadMe")
(dest #dest-dir)
)
)
(copyfiles
(source "ReadMe.info")
(dest #dest-dir)
)
(tooltype (dest (tackon #dest-dir "ReadMe")) (setdefaulttool "MultiView") (noposition))
; Tell the system about the new descriptors
(run "C:AddDataTypes Refresh")
(execute "ReadMe")
(complete 100)
(exit #txt-end)
)
)